package com.neo.subscribe.stamp.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.neo.subscribe.stamp.entity.InterfaceConfig;
import com.neo.subscribe.stamp.mapper.InterfaceConfigMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class InterfaceConfigService {

    @Autowired
    private InterfaceConfigMapper mapper;


    public List<InterfaceConfig> list(Integer type) {
        Wrapper<InterfaceConfig> wrapper = new QueryWrapper<InterfaceConfig>().lambda()
                .likeLeft(InterfaceConfig::getType, type)
                .eq(InterfaceConfig::getValid, 1);
        return mapper.selectList(wrapper);
    }

}
